package com.bdqn.t313.aop;

import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

@Component
@Aspect
public class CheckAccessAop {

    /**
     * 定义切入点
     */
    @Pointcut("execution(public int save())")
    public void pointCut(){}



    /**
     * 前置增强
     * @param joinPoint
     */
    @Before("pointCut()")
    public void before(JoinPoint joinPoint){
        System.out.println("检查权限....");
    }
}
